Image manipulation programs are used to modify or otherwise use image content captured using a camera. For example, an image manipulation program can remove or decrease noise from (i.e., de-noise) image content captured using the camera. An image manipulation program can also remove or decrease blurring in image content captured using the camera. Noise can be caused by, for example, capturing images in low light conditions with low-end cameras. Low-end cameras may include image sensors having a high sensitivity to light conditions. Increasing the sensitivity to light conditions can add noise to image content captured with the camera.
Existing solutions for de-noising image content can improve the quality of image content. One existing solution is a non-local means algorithm. A non-local means algorithm can average pixel values in image patches (i.e., portions of the input image) of a noisy image using weighted averages. The non-local means algorithm can identify a given patch of the noisy image as a subject patch. Pixel values are averaged for image patches that are similar to the subject image patch. Averaging the pixel values can reduce the effect of noise in the input image.
Another existing solution is a block-matching and three-dimensional filtering (“BM3D”) algorithm that groups similar patches and performs collaborative filtering. A BM3D algorithm selects all similar patches for an input image and divides the similar patches into groups. For each group, collaborative filtering is performed. A “clean” (i.e., de-noised) image can be re-constructed from the filtered patches.
However, among other deficiencies, existing solutions for de-noising or other image enhancement operation use a fixed patch size for all regions of an input image. Using a fixed patch size that is too large can prevent non-local means and/or BM3D algorithms from finding enough similar patches in the vicinity of a target patch to perform accurate de-noising. Using a fixed patch size that is too small can cause inefficient processing of uniform image regions.